package demo3;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:张熳
 * Date:2025-08-25
 * Time:1:15
 */
//多态
//避免在构造方法中调用重写的方法

public class Derived extends Base{
    private int num = 1;//子类的实例
    @Override
    public void func(){
        System.out.println("Derived.func()" + num);
    }
}
